﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SmartWMS.Common.ResponseOutput;
using SmartWMS.Domain.BasicsDatum;
using SmartWMS.Server.StatementServer.InventoryCapacityServices;
using SmartWMS.Server.StatementServer.InventoryCapacityServices.Dto;

namespace SmartWMS.API.Controllers.StatementMange
{
    /// <summary>
    /// 库存容量控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class InventoryCapacityController : ControllerBase
    {
        private readonly IInventoryCapacityServices _inventoryCapacityServices;

        public InventoryCapacityController(IInventoryCapacityServices inventoryCapacityServices)
        {
            _inventoryCapacityServices = inventoryCapacityServices;
        }
        /// <summary>
        /// 库存容量列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpPost]
        public Task<Response<List<InventoryCapacityDto>>> GetInventoryCapacityList(InventoryCapacitySelectDto input)
        {
            return _inventoryCapacityServices.GetInventoryCapacityList(input);
        }

        /// <summary>
        /// 加载仓库
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public Task<Response<List<Warehouse>>> BindWarehouseAsync()
        {
            return _inventoryCapacityServices.BindWarehouseAsync();
        }
    }
}
